#ifndef _UI_SLIDER_H_
#define _UI_SLIDER_H_

#include "ui_widget.h"
namespace ui
{
class UISlider : public UIWidget
{
public:
/// stuff that every self-respecting widget should have
						UISlider(UIWidget* pParent,const std::string& Name = "");
	virtual				~UISlider();
	virtual bool		Create(const std::string& Name, const math::Vec2& Pos = math::Vec2(0.5f, 0.5f), const math::Vec2& Size= math::Vec2(0.1f, 0.1f));
	virtual	bool		Load(LuaPlus::LuaObject& _LObj);
	/// update
	virtual	bool		Tick(float dt);
	/// display
	virtual bool		Render(bool Force = false);
	/// register with LUA Bind
	static	void		Register(LuaPlus::LuaState* _pScript);

	//// specifics for slider
	virtual bool		OnMouseDown(const math::Vec2& Pos, unsigned int Button);
	virtual bool		OnMouseDrag(const math::Vec2& From, const math::Vec2& To);
	virtual bool		OnMouseDrop(const math::Vec2& From, const math::Vec2& To, UIWidget* pDroppedWidget);
	float				GetSlider() const { return m_SliderPos; };
	void				SetSlider(float f);
	virtual UIWidget*	GetClone();

protected:
	virtual bool		ExportSpecificsToFile(script::WriteLua*	pWL);
	float				m_SliderPos;
	math::Vec2			m_SliderSize;
};


}  //namespace ui

#endif // _UI_SLIDER_H_